<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <title>编辑产品细节</title>
    <th:block th:include="layout/header"></th:block>
</head>
<body>
    <div class="container">
        <h2>编辑产品细节</h2>
        <div>
            <form class="form-horizontal" th:object="${product}" th:action="@{/products}" method="post">
                <div class="form-group">
                    <div class="col-sm-10">
                        <input type="hidden" class="form-control" th:field="*{id}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">名称：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" th:field="*{name}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">图片地址：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" th:field="*{img}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">描述：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" th:field="*{description}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">类型：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" th:field="*{type}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">类别：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" th:field="*{category}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">价格：</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" th:field="*{price}" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</body>

</html>